package com.xm.service;

import com.xm.dao.footDao;
import com.xm.pojo.foot;
import com.xm.pojo.product;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class footServiceImpl implements footService{

    @Autowired
    private footDao footDao;

    /*查询用户足迹*/
    @Override
    public List<foot> footAll(int userId) {
        return footDao.footAll(userId);
    }

    @Override
    public boolean updateFoot(int userId, int productId) {
        return footDao.updateFoot(userId,productId);
    }

    @Override
    public boolean addFoot(int userId, int productId) {
        return footDao.addFoot(userId,productId);
    }

    /*通过用户id和商品id查询是否存在足迹*/
    @Override
    public foot userFootInfo(int userId, int productId) {
        return footDao.userFootInfo(userId,productId);
    }

    /*删除足迹（单个/多个）*/
    @Override
    public boolean delFoot(int id) {
        return footDao.delFoot(id);
    }
    /*删除足迹（全部）*/
    @Override
    public boolean delFootAll(int userId) {
        return footDao.delFootAll(userId);
    }
    /*通过购物车id查询商品信息*/

}
